<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
<title>DynamoRIO API: Code Coverage Tool</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">DynamoRIO API
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('page_drcov.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Code Coverage Tool </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><code>drcov</code> is a DynamoRIO client tool that collects code coverage information.</p>
<ul>
<li><a class="el" href="page_drcov.html#sec_drcov">The Code Coverage Client</a></li>
<li><a class="el" href="page_drcov.html#sec_drcov2lcov">Post-Processing</a></li>
</ul>
<h1><a class="anchor" id="sec_drcov"></a>
The Code Coverage Client</h1>
<p>The DynamoRIO tool <code>drcov</code> collects information about which basic blocks have been executed. It writes the results to a separate log file per process.</p>
<p>The runtime options for this tool include:</p>
<ul>
<li><b>-dump_text</b>: Dumps the log file in text format.</li>
<li><b>-dump_binary</b>: On by default, dumps the log file in binary format.</li>
<li><b>-</b>[no_]nudge_kills: Windows only. On by default. Uses nudge to notify the process for termination so that the exit event will be called.</li>
<li><b>-logdir</b> dir: Sets log directory, which by default is ".".</li>
</ul>
<h1><a class="anchor" id="sec_drcov2lcov"></a>
Post-Processing</h1>
<p>A post-processing tool <code>drcov2lcov</code> is provided to convert binary log files generated by the drcov client to the lcov format. The resulting files can be processed by <a href="http://ltp.sourceforge.net/coverage/lcov.php">lcov</a>.</p>
<p>A help message about how to use drcov2lcov can be obtained by running drcov2lcov with no arguments: </p>
<div class="fragment"><div class="line">drcov2lcov</div>
<div class="line">usage: drcov2lcov [options]</div>
<div class="line">      --help                          Print <span class="keyword">this</span> message.</div>
<div class="line">      --verbose &lt;int&gt;                 Verbose level.</div>
<div class="line">      --warning &lt;int&gt;                 Warning level.</div>
<div class="line">      --list &lt;input list file&gt;        The file with a list of drcov files to be processed.</div>
<div class="line">      --dir &lt;input directory&gt;         The directory with all drcov.*.log files to be processed.</div>
<div class="line">      --output &lt;output file&gt;          The output file.</div>
<div class="line">      --mod_filter &lt;module filter&gt;    Only process the module whose path contains the filter <span class="keywordtype">string</span>.</div>
<div class="line">      --src_filter &lt;source filter&gt;    Only process the source file whose path contains the filter <span class="keywordtype">string</span>.</div>
<div class="line">      --reduce_set &lt;reduce_set file&gt;  Find a smaller <span class="keyword">set</span> of log files from the inputs that have the same code coverage and write those file paths into &lt;reduce_set file&gt;.</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer" style="float:none;text-align:center"><img border=0 src="favicon.png"> &nbsp;  DynamoRIO API version 5.0.0 --- Wed Sep 10 2014 21:36:44 &nbsp; <img border=0 src="favicon.png">
</small></address>
<!--END !GENERATE_TREEVIEW-->
</body>
</html>
